using UnityEngine;

namespace GameCore
{
    public class IdleState : PlayerInputState
    {
        public Cell cell;
        public override void OnHoveringCellChanged(Cell prev, Cell curr)
        {
            prev?.SetNormal();
            curr?.SetSuccess();
            cell = curr;
        }

        public override void Update()
        {
            if (Input.GetMouseButtonDown(0))
            {
                cell?.OnClick();
            }
        }

        public override void Exit()
        {
            cell?.SetNormal();
        }
    }
}